package com.demo.server.controller;

import com.demo.common.entity.UserDemo;
import org.apache.catalina.User;
import org.springframework.web.bind.annotation.*;

/**
 * @author tianzhuang
 * @version 1.0
 * @date 2021/12/13 11:29
 */
@RestController
@RequestMapping("server")
public class ServerController {

    @GetMapping("/testGetServer")
    public String testGetMethod(@RequestParam("val") String val) {
        return "this is server"+val;
    }


    @PostMapping("/testPostServer")
    public UserDemo testGetMethod(UserDemo userDemo) {
        userDemo.setName("server");
        return userDemo;
    }
}
